﻿using System;
using System.Xml.Serialization;

namespace Whois.API.Model
{
    public class Registrant : ModelBase
    {

        [XmlElement(ElementName = "city")]
        public string City { get; set; }

        [XmlElement(ElementName = "state")]
        public string State { get; set; }

        [XmlElement(ElementName = "postalCode")]
        public string Postcode { get; set; }

        public string FirstLine()
        {
            return RawText.Substring(0, RawText.IndexOf("\n", StringComparison.CurrentCultureIgnoreCase));
        }


    }
}
